var client = {};

client.run = function (options) {

	options = options || {};


	var url = "ws://localhost:8080/admin/test.ws?t="+ new Date().getTime();
	//var socket = io.connect(options.remote || "http://localhost:8080");
	var socket = new WebSocket(url);
	socket.onopen= function(event){

		socket.send('I am the client and I\'m listening!');
	};

	socket.onmessage= function(event){

		alert('来自服务器的消息:'+event.data);

	};

	socket.onclose= function(event){

		//socket关闭
		alert('close');
	};

};